const http = require('../utils/http')

const HTTP = new http.HTTP()

// 账号密码登录
export function loginAccount(username, password, usertype, callback) {
  let params = {
    username,
    password,
    usertype
  }
  HTTP.request('/login/account', 'POST', params, res => {
    callback(res)
  })
}

// 微信快捷登录
export function loginWx(code, usertype, callback) {

  let params = {
    code,
    usertype
  }
  HTTP.request('/login/wechat', 'POST', params, res => {
    callback(res)
  })
}